#ifndef _FUN_H_
#define _FUN_H_

#include "rknn_api.h"
#include "common.h"

typedef struct{
    rknn_context rknn_ctx;
    rknn_input_output_num io_num;
    rknn_tensor_attr* input_attrs;
    rknn_tensor_attr* output_attrs;

    int model_channel;
    int model_width;
    int model_height;
} model_context;

// typedef output



int init_model(model_context* model_ctx, const char* model_path);
int load_and_transform_image(image_buffer_t* image_info, const char *image_path);

int free_model(model_context* model_ctx);
int free_image(image_buffer_t* image_info);

int inference(model_context* model, image_buffer_t* img_in);

#endif
